package com.yixin.ystartlibrary.widget;

import android.content.Context;
import android.util.AttributeSet;
import android.widget.GridView;

public class NoScrollGridView extends GridView {

//	<com.luozi.library.widget.NoScrollGridView
//	android:id="@+id/item_grid_view"
//	android:layout_width="match_parent"
//	android:layout_height="wrap_content"
//	android:layout_marginBottom="10dp"
//	android:background="@color/white"
//	android:cacheColorHint="@android:color/transparent"
//	android:horizontalSpacing="5dp"
//	android:listSelector="@android:color/transparent"
//	android:numColumns="2"
//	android:stretchMode="columnWidth"
//	android:verticalSpacing="10dp"
//	android:visibility="gone"/>

	public NoScrollGridView(Context context, AttributeSet attrs) {
		super(context, attrs);
		// TODO Auto-generated constructor stub
	}

	@Override
	protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
		// TODO Auto-generated method stub
			super.onMeasure(widthMeasureSpec, heightMeasureSpec);
		 int mExpandSpec = MeasureSpec.makeMeasureSpec(Integer.MAX_VALUE >> 2, MeasureSpec.AT_MOST);
         super.onMeasure(widthMeasureSpec, mExpandSpec); 
	}

}
